package com.glq1218.controller;

import com.glq1218.domain.entity.User;
import com.glq1218.domain.vo.PageParamsVo;
import com.glq1218.domain.vo.PageVo;
import com.glq1218.response.ResponseResult;
import com.glq1218.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author glqiang
 * @date 2022/11/15 23:21
 */
@RestController
public class UserController {
    @Autowired
    private UserService userService;

    @GetMapping("/listUser")
    public ResponseResult<PageVo<User>> listUser(@RequestParam Integer pageNum,@RequestParam Integer pageSize) {
        return userService.listUser(new PageParamsVo(pageNum, pageSize));
    }
}
